<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>赋值运算符</title>
</head>
<body>
    <script>
        // = 赋值    ==  判断是否相等 

        var num = 100;

        console.log(num)

        // num = num + 100 
        // console.log(num)
        num += 100 // 等同于num = num+100 
        console.log(num) // 200 
        

        // -= 
        num -= 100  // num = num -100
        console.log(num) // 100

        // *= 
        num *= 5 // num = num * 5
        console.log(num) // 500
        // /=

        num /= 5  // num = num /5
        console.log(num) // 100
        // %=

        num  %= 3 // num = num %3 
        console.log(num)
        // **=
        num **=2 // num = num**2
        console.log(num)


    </script>
</body>
</html>